﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Work20._5._18
{
    class Start
    {
        static void Main(string[] args)
        {
            //computer
            Computer computer = new Computer();

            //computer.Add(2.0, 11);
            
            //加
            var a = computer.Add(2.0, 11);
            var b = computer.Add(2.1, 11);

            Console.WriteLine(a.ToString());//ToString 	把类型转换为字符串类型。
            Console.WriteLine(b.ToString());

            Console.WriteLine();

            //减
            var c = computer.Minus(2.0, 11);
            var d = computer.Minus(2.1, 11);

            Console.WriteLine(c.ToString());//ToString 把类型转换成字符串类型
            Console.WriteLine(d.ToString());

            Console.WriteLine();

            //乘
            var e = computer.Multiply(2.0, 11);
            var f = computer.Multiply(2.1, 11);

            Console.WriteLine(e.ToString());
            Console.WriteLine(f.ToString());

            Console.WriteLine();

            //除
            var g = computer.Divide(2.0, 11);
            var h = computer.Divide(2.1, 11);

            Console.WriteLine(g.ToString());
            Console.WriteLine(f.ToString());
            Console.WriteLine();

            //强制类型转换 数据类型变量名 =（数据类型） 变量名或值；
            double i = 12315665.513321;

            int j = (int)i;
            Console.WriteLine(i);
            Console.WriteLine(j);
        }


    }
}
